Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Extensions to the SoundDescription Record

Two extensions are defined to the SoundDescription record. The first is the slope, intercept, minClip, and maxClip parameters for audio as defined in Appendix D. This is represented as an atom of type siSlopeAndIntercept. The contents of the atom are:

struct SoundSlopeAndInterceptRecord {
    Float64                 slope;
    Float64                 intercept;
    Float64                 minClip;
    Float64                 maxClip;
};
typedef struct SoundSlopeAndInterceptRecord SoundSlopeAndInterceptRecord;

The second extension is the ability to store data specific to a given audio decompressor in the SoundDescription record. Some audio decompression algorithms, such as Microsoft's ADPCM, require a set of out-of-stream values to configure the decompressor. These are stored in a siDecompressorSettings . The contents of the siDecompressorSettings atom are dependent on the audio decompressor. If the QuickTime movie was created from a WAVE ( .WAV ) or AVI ( .avi ) file, the siDecompressorSettings atom is automatically created and set to the contents of the WAVEFORMATEX structure from that file. In this case, the siDecompressorSettings atom contains little-endian data.

At runtime, the contents of the type siSlopeAndIntercept and siDecompressorSettings atoms are provided to the decompressor component through the standard SetInfo mechanism of the Sound Manager. The samplesPerPacket, bytesPerPacket, bytesPerFrame, and bytesPerSample fields are also passed to the decompressor component via SetInfo in a CompressionInfo structure with the siCompressionFactor selector.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |